﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// 
#pragma once
#include "GcmpActionInterface.h"
#include "ILineEditDefinition.h"
#include "IObject.h"

namespace gcmp
{
    class ILineEditEvent;

    /// \brief 坐标输入控件定义
    /// 
    class GCMP_ACTION_INTERFACE_EXPORT ICoordinateInputDefinition : public IObject
    {
    public:
        /// \brief 析构函数
        virtual ~ICoordinateInputDefinition();

    public:
       /// \brief 创建坐标输入控件定义
       /// \param id    坐标输入控件定义唯一标识符
       /// \param caption  坐标输入控件标题
       /// \param inputType  坐标输入控件定义输入数据类型
       /// \return  坐标输入控件定义
       static OwnerPtr<ICoordinateInputDefinition> Create(const std::wstring& id, 
           const std::wstring& caption,LineEditInputType inputType = LineEditInputType::InputString);

       /// \brief  获取坐标输入控件定义唯一标识符
       /// \return  坐标输入控件定义唯一标识符
       virtual std::wstring GetId() const = 0;

       /// \brief 设置坐标输入控件定义文本
       /// \param text  文本
       /// \return 
       virtual bool SetText(const std::wstring& text) = 0;

       /// \brief  获取坐标输入控件定义文本
       /// \return  坐标输入控件定义文本
       virtual std::wstring GetText() const = 0;

       /// \brief  获取坐标输入控件定义输入类型
       /// \return  坐标输入控件定义输入类型
       virtual LineEditInputType GetInputType() const = 0;

       /// \brief  获取坐标输入控件定义标题
       /// \return  坐标输入控件定义标题
       virtual std::wstring GetCaption() const = 0;

       /// \brief  获取坐标输入控件定义提示信息
       /// \return  坐标输入控件定义提示信息
       virtual std::wstring GetTooltip() const = 0;

       /// \brief  获取坐标输入控件定义事件
       /// \return  坐标输入控件定义事件
       virtual ILineEditEvent* GetEvent() const = 0;

       /// \brief  获取坐标输入控件定义是否编辑结束
       /// \return  坐标输入控件定义编辑结束返回true，否则返回false
       virtual bool IsEditingFinished() const = 0;

       /// \brief 设置坐标输入控件定义是否编辑结束
       /// \param isEditingFinished  是否编辑结束
       /// \return 
       virtual void SetIsEditingFinished(bool isEditingFinished) = 0;

       /// \brief  获取坐标输入控件定义是否处于锁定状态
       /// \return  坐标输入控件定义处于锁定状态返回true，否则返回false
       virtual bool IsLock() const = 0;
    };
}
